<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApplyReviewTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apply_review', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('apply_id')->index();
            $table->integer('admin_id')->comment('管理员ID')->index();
            $table->tinyInteger('status')->default(0)->comment('状态：0未查看，1待定，2通过，3拒绝');
            $table->tinyInteger('stage')->default(1)->comment('阶段,1初审，2复审，...');
            $table->string('evaluation', 510)->default('')->comment('评论');
            $table->string('remark', 510)->default('')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('apply_review');
    }
}
